package 比赛.chuanZhiMoNi;

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class D {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int length = sc.nextInt();
        int num = sc.nextInt();
        int[] numbers = new int[length];
        if(numbers == null){
            System.out.println("IMPOSSIBLE");
            return;
        }


        for(int i = 0;i<length;i++){
            numbers[i] = sc.nextInt();
        }

        Map<Integer, Integer> map = new HashMap<Integer, Integer>();

        for (int i = 0; i < numbers.length; i++) {
            if (map.get(num - numbers[i]) != null) {
                System.out.println("" + (map.get(num - numbers[i]) + 1) + " " +  (i + 1) );
                return;
            }
            map.put(numbers[i], i);
        }

        System.out.println("IMPOSSIBLE");
    }


}
